package com.tengju.settlement.domain.model.depository;

import com.tengju.settlement.domain.model.account.UserIdCode;

import java.time.LocalDateTime;

public class DepositoryBankCardFactory {




    public static DepositoryBankCard createCompanyCard(DepositoryBindCardForm form, DepositoryAccountId depositoryAccountId, UserIdCode idCode, BindStatus status, LocalDateTime expireTime) {

        BankCardExtra extra = new BankCardExtra();
        if (form.getCardType() == BankCardType.PUBLIC) {
            extra.setRetryNum(0);
        }
        extra.setReservedMobile(form.getMobile());
        extra.setVerifyExpireTime(expireTime);

        return new DepositoryBankCard(null,idCode,
                depositoryAccountId,
                form.getCardType(),
                form.getCardNo(),
                form.getBankName(),
                form.getSuperBankCode(),
                status,
                extra);
    }

}
